package com.example.http.demo.reponse;

import java.io.Serializable;

public class HttpBaseResponse implements Serializable {
    private Integer code;

    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    /**
     * 判断是否请求ok
     *
     * @return
     */
    public boolean isOk() {
        return this.code != null && this.code == 200;
    }
}
